local haiwangfuxie = fk.CreateSkill {
    name = "haiwangfuxie",
    tags = { Skill.Compulsory },
}

Fk:loadTranslationTable{
  ["haiwangfuxie"] = "覆写",
  [":haiwangfuxie"] = "锁定技，每轮限一次，你受到的伤害-1.",
}

haiwangfuxie:addEffect(fk.DamageInflicted, {
  mute = true,
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(haiwangfuxie.name) and player:usedSkillTimes(haiwangfuxie.name,Player.HistoryRound) == 0
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    player:broadcastSkillInvoke(haiwangfuxie.name)
    room:notifySkillInvoked(player, haiwangfuxie.name, "negative")
    data.damage = data.damage -1
  end,
})

return haiwangfuxie
